#include <bits/stdc++.h>
using namespace std;
int n;
float x, y;
int z;
float t;

int main() {
    float s;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> x >> y >> z;
        s = sqrt(x * x + y * y);
        t += 2 * s / 50;
        t += z * 1.5;
    }

    int ans = t;
    if (ans != t)
        ans++;

    cout << ans;
    return 0;
}